package qtdz8;

import javax.swing.*;

public class MineSubmarine extends SeaObject {
    public MineSubmarine() {
        super(63, 19);
    }

    public void move() {
        x += speed;
    }

    public ImageIcon getImage() {
        return Images.minesubm;
    }

    //重写getLif()方法获取命数
    public int getLife() {
        return 1;//打掉水雷潜艇,战舰的1条命
    }

    //发射水雷,生成水雷对象
    public Mine shootMine() {
        return new Mine(this.x + this.width, this.y - 11);
    }
}
